#include <complex>
#include <tnt.h>
typedef std::complex<double> DComplex;
typedef TNT::Array2D<DComplex> ComplexMatrix;
typedef TNT::Array1D<DComplex> ComplexArray;

typedef TNT::Array2D<double > DoubleMatrix;
typedef TNT::Array1D<double > DoubleArray;

class Pseudospectra
{
private:
  int _N; 			/// Order of the matrix.
  ComplexMatrix _T; /// Complex Schur decomposition of matrix.
  ComplexArray _eig; /// Eigenvalues.
  
  void init(DoubleMatrix &a);

public:
  Pseudospectra(DoubleMatrix a);
  Pseudospectra(double *a, int n);
  
  double sigmin(double x, double y, ComplexMatrix T1);
  int order(){ return _N; }
  ComplexMatrix &schur(){ return _T; }
  DComplex *schur1(){ return _T[0]; }
  DComplex *eig(){ return _eig; }
};


  

  
